package com.platform.server.util.excel;



import java.util.Date;

/**
 * Excel 测试
 * @author Lius
 */
public class Student {
	@Excel(exportName="姓名",exportFieldWidth=18,exportConvertSign=0,importConvertSign=0)  
	private String name;  
	@Excel(exportName="年龄",exportFieldWidth=4,exportConvertSign=0,importConvertSign=0)  
	private Integer age;  
	@Excel(exportName="性别",exportFieldWidth=4,exportConvertSign=1,importConvertSign=1)  
	private Integer sex;  
	@Excel(exportName="出生日期",exportFieldWidth=20,exportConvertSign=0,importConvertSign=0)  
	private Date birthDate;  
	@Excel(exportName="描述",exportFieldWidth=30,exportConvertSign=0,importConvertSign=0)  
	private String desc;  
	@Excel(exportName="是否VIP",exportFieldWidth=7,exportConvertSign=1,importConvertSign=1)  
	private Boolean isVip;  
	//convertSign=1时必须加入转化方法   不加入会报错    返回值为String  用于翻译  
	//convertSign=0不需翻译，不用书写转化  
	//导入需要 set ,导出需要get  
	public String getSexConvert()  
	{  
	if(sex == 1)  
	{  
	return "male";  
	}else if(sex == 2){  
	return "女";  
	}else  
	{  
	return "";  
	}  
	}  
	public void setSexConvert(String text)  
	{  
	if("male".equals(text))  
	{  
	sex = 1;  
	}  
	if("女".equals(text))  
	{  
	sex = 2;  
	}  
	}  
	
	public String getIsVipConvert()  
	{  
	if(isVip == null)  
	{  
	return "";  
	}  
	if(isVip)  
	{  
	return "是";  
	}else{  
	return "否";  
	}  
	}  
	public void setIsVipConvert(String text)  
	{  
	if("是".equals(text))  
	{  
	isVip = true;  
	}  
	if("否".equals(text))  
	{  
	isVip = false;  
	}  
	}  
	//getter and setters  
	public String getName() {  
	return name;  
	}  
	  
	  
	public void setName(String name) {  
	this.name = name;  
	}  
	  
	  
	public Integer getAge() {  
	return age;  
	}  
	  
	  
	public void setAge(Integer age) {  
	this.age = age;  
	}  
	  
	  
	public Integer getSex() {  
	return sex;  
	}  
	  
	  
	public void setSex(Integer sex) {  
	this.sex = sex;  
	}  
	  
	  
	public String getDesc() {  
	return desc;  
	}  
	  
	  
	public void setDesc(String desc) {  
	this.desc = desc;  
	}  
	  
	  
	  
	  
	public Date getBirthDate() {  
	return birthDate;  
	}  
	  
	  
	  
	  
	public void setBirthDate(Date birthDate) {  
	this.birthDate = birthDate;  
	}  
	public Boolean getIsVip() {  
	return isVip;  
	}  
	public void setIsVip(Boolean isVip) {  
	this.isVip = isVip;  
	}  
	  
	  
}
